home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Libris Britannia 4
/
science library(b).zip
/
science library(b)
/
PROGRAMM
/
PROGEDIT
/
0773.ZIP
/
BRIEF.DOC
< prev
next >
Wrap
Text File
|
1987-12-19
|
12KB
|
331 lines
SE A Compact, Easy-to-Use, Portable Screen Editor
J. A. Pickering,
Department of Electronics and Computer Science,
Southampton University, UK.
Background
The single most heavily used software tool in a general
purpose computing environment is the program text editor.
More time is spent using an editor than perhaps any other
interactive computing tool. Learning to use one is the next
most essential skill required beyond logging on and
displaying a few files.
With the increasing number of computer systems that are
accessible to the average user today, it is becoming
important that there is an editor with the same interface
available on each machine. This is particularly true in a
University environment where both staff and students
regularly migrate between machines on an hour to hour, day to
day basis. The freedom to use the most suitable machine for
a particular task should not be hindered by the requirement
to learn how to use yet another text editor. This common
problem has not been met with many economically attractive
solutions.
The most well known portable editor is EMACS and its reduced
version for PCs, microEMACS, which are both available in
source in the Public Domain. microEMACS is small enough to
provide a solution though, perhaps, not the best one.
Overview of SE
SE is a screen editor for programs and text files. SE is not
a traditional 'word processor' type editor as it makes no
attempt at automatically adjusting layout.
The major features of the SE Screen Editor are:
- free cursor movement (natural with a mouse),
- streamlined, consistent user interface,
- insert/overtype editing modes,
- windowing for long lines,
- block move/copy,
- file merging,
- auto-indent option,
- word wrapping option,
- user defined tab increment,
- string search including 'bracket' matching,
- bar line and 'approximate' numbers for easy navigation,
- large file support through 'folding',
1
SE A Compact, Easy-to-Use, Portable Screen Editor
- keyboard macro facility,
- placeholder facility,
- browse mode,
- shelling to host command environment,
- highly portable and available in source.
SE is designed to be highly portable and thus be the editor
that every machine has available. It is written in C and is
small enough for there to be little excuse for not porting it
to new environments. The interface to the user is as uniform
as the host hardware permits and consistent, making SE really
easy to use in all its implementations. SE will never claim
to be the 'best' editor in the world but it may be the
sleekest and should well serve the needs of migratory users
of computer systems. SE may well be useful to those in MMI
research since its behaviour can be subtly altered and the
code easily instrumented to measure users' performance.
Design and Philosophy of SE
For a beginning user a program must be 'forgiving' and
support experimentation without undue penalty. It should
also provide sufficient feedback to develop the user's
confidence. The commands must appeal to the user's existing
or 'world' knowledge of how similar programs or functions
behave to minimise the amount of re-learning required. This
is also particularly important to experienced computer users
who are, perhaps, the most demanding and impatient naive
users of programs.
The user interface requirements of both populations can be
met by having economical, simple models and a 'regular' set
of operations which provide the necessary functionality. In
SE there are a small number of screen-editing functions which
perform the text and cursor movement operations. These same
functions are used in a semantically consistent way to
provide a richer set of commands available in command mode.
This is achieved by allowing an argument to be prefixed to
the command in this mode which simply augments its normal
operation. The attraction of a small number of commands is
that it reduces learning time and task planning effort and
speeds skill acquisition. Most of the time users only
exercise a small sub-set of the command repertoires of
complex systems, even if they know that (somehow, somewhere)
there is 'better' way of performing a specific task. SE
takes the approach that the correct way is the only way and
the one that comes most naturally and easily.
Maintaining the dialogue between user and machine means
making sure that the user is always kept informed about what
is happening. It was a design objective that SE should
always provide further user feedback each second even if it
is only some form of status report. The user may also
interrupt lengthy or 'dangerous' operations so that the cost
of making errors is kept low and the user feels that he is
always in control. Continuous feedback is also given on the
dynamically changeable modes since these change often and
2
SE A Compact, Easy-to-Use, Portable Screen Editor
their state can be easily forgotten, leading to slips.
Users still like 'hard copy' output. Indeed almost
everything that is edited eventually ends up on paper in some
form or other. However, an editor does not afford the same
navigational freedom around a text compared with browsing or
flicking through a paper copy. The display window provides a
small 'port hole' view and cannot be moved around freely,
even with sophisticated windowing systems. As far as
possible analogues of indexing through a listing are
provided, such as a bar line position indicator and a place
holder.
Man is notoriously bad at counting and invented computers to
help with such tasks. Many editors still demand that a user
qualify commands with accurate numerical arguments. SE
accepts a wide range of abbreviated 'approximate' numbers in
its commands as an alternative to exact values.
Table 1. Key function summary
The command set adopted is illustrated in Table 1. Basic use
of the editor can be achieved using the commands in screen
editing mode, all of them being available on function keys
(as shown in Figure 1 for a VT100-type terminal, similar for
PCs). All the commands can be prefixed with a parameter in a
command mode thus yielding an ancilliary set with related
behaviour. A small group of additional commands is available
in command mode. They introduce themselves naturally since
some are essential to leaving SE. These commands are given
in Table 2.
EMACS and microEMACS have a 'toolset' approach to program
3
SE A Compact, Easy-to-Use, Portable Screen Editor
Figure 1. VT100-type function keypad layout
Table 2. Simple commands summary
editing in which the fundamental internal operations provided
can bound to function keys or grouped and the group (macro)
bound to a key. The operational model and range of functions
is considerably more complex, even in microEMACS. The
default key bindings, found in most implementations, are not
very easy to learn as there are very few general
relationships amongst the wide range of functions.
SE can be thus termed a 'Reduced Instruction Set' editor,
following the RISC ethos, with all the consequent advantages
(regularity) and disadvantages (too simple) attached to this
approach. At least one of the benefits is that SE is small
and easy to port. There is little excuse for it not to be
available on a machine, even though it never likely to be as
'good' as the native editor.
4
SE A Compact, Easy-to-Use, Portable Screen Editor
Features
One of the novel features of SE is the mechanism it uses to
support large texts. The concept of 'folding', popularised
by INMOS in their Transputer development system suite, is an
old one but not directly supported by many editors. SE uses
folding in preference to a 'virtual' text buffer so as
actively to encourage modular software or document
preparation. Almost all modern programming languages and
text processing tools support hierarchical organisation of
source texts. Some form of 'include' directive specifies a
filename argument for the lower order component. In SE, if
the cursor is moved to this part of the 'fold' point, the
command SE in command mode spawns a new incarnation using the
filename at the cursor as the file parameter. The parent SE
is suspended awaiting the completion of the sibling fold
edit(s). An initially large text can be folded up by SE
using this technique and 'filling' mode to fill progressively
each fold with text.
Auto-word-wrap and auto-indent are also featured together
with 'bracket matching' type searches. Repetitive edits can
be performed using a keyboard macro facility which is also
used, in combination with the string search, to perform
string substitution.
The 'quarter plane' display model is employed, allowing
complete freedom of movement of the cursor within the display
window bounds. This is the only applicable method when
cursor commands are generated using a mouse.
Current status
The full implementation of SE is available in C for UNIX and
MSDOS and several other similar operating systems and
machines+. (A version in BCPL also exists.) The
implementations are in heavy use by students on their
programming courses and by staff.
One of the meanings of the acronym SE is 'simple editor' and
the pressure to introduce more functions was resisted unless
they could be fitted neatly into the existing command
framework and philosophy. The resulting commented C source
thus amounts to 125kbytes and has been written specifically
to ease porting; only an isolated 45kbytes contains any
machine or compiler dependencies. The program size is
30kbytes under MSDOS and about 50kbytes on a 68000-based UNIX
machine.
+ The binaries for SE are in the Public Domain. The C source
and full Reference Manual and Tutorial are available from
Grey Matter, 4 Prigg Meadow, Ashburton, Devon TQ13 7DF, UK.
Tel: +44 (0)364 53499.
5